#ifndef File_First
#define File_First
#ifdef __GNUG__
#pragma interface
#endif

//---- File --------------------------------------------------------------------

class File {
public:
	static int Open(const char*, int, const char *msg= 0);
	static int Creat(const char*, int, const char *msg= 0);
	static int Close(int, const char *msg= 0);
	static int Read(int fd, char *buf, int nbyte);
	static int Write(int fd, const char *buf, int nbyte);
	static long Lseek(int, long, int);
	static int Unlink(const char*);
	static int Link(const char*, const char*);
	static int SetNonBlock(int fd);

	static int AddFdName(int fd, const char *name, const char *msg);
	static void RemoveFdName(int fd, const char *msg);
	static const char *FdName(int fd);
	static void Cleanup();
};

#endif

